#ifndef _ERR_HANDLE_H_
#define _ERR_HANDLE_H_

#include <stdio.h>
#include <string.h>

#ifndef _linux_
#include <windows.h>
#endif

typedef unsigned int tExceptionType;

// base class of error.
class BaseException
{
	static const unsigned int MAX_TXT_SIZE = 256;
public:
	tExceptionType		m_Type;
    char				m_DebugText[MAX_TXT_SIZE];

	BaseException(tExceptionType type, const char* string=NULL):
	m_Type(type)
    {
		if (string)
		{
#ifndef _linux_
			lstrcpynA(m_DebugText, string, MAX_TXT_SIZE);
#else
			strncpy(m_DebugText, string, MAX_TXT_SIZE);
#endif
		}
		else
		{
			m_DebugText[0] = 0;
		}
    }

	virtual ~BaseException()
	{
	}
};

#endif
